import unittest
from page.search import Search
from utils import handle_conf

section = 'search'
page = handle_conf.HandleConf(handle_conf.HandleConf('conf.ini').get_value('data', 'data_name'))


class TestSearch(unittest.TestCase):
    @classmethod
    def setUpClass(cls) -> None:
        cls.search = Search()

    def test_search_01(self):
        self.search.input_value(page.get_value(section, 'case01_input'))
        self.search.click_button()
        actual_text, expected_result = self.search.assert_case_01()
        self.assertEqual(actual_text, expected_result)
